<style>
    span {
        display: block;
    }
    
    b {
        font-weight: normal;
    }
</style>
<div class="cont">
    <!--页面遮罩层-->
    <!--二级标题-->
    <div class="position">
        <img alt="位置图标" src="dist/images/position.png" />风控管理&gt;400记录
        <a ng-click="openDetail('',index_key)" ng-hide="$needClientCache" title="打开新窗口查看"><i class="large External icon"></i></a>
    </div>
    <!--查看方式-->
    <div class="mybackground">
        <div class="cont_fr_top">
            <div class="menus_top">
                <div class="menus_l">处理状态：</div>
                <ul id="nav">
                    <li class="selected">
                        <a ng-click="search_p.state=-1">全部</a>
                    </li>
                    <li>
                        <a ng-click="search_p.state=0">未处理</a>
                    </li>
                    <li>
                        <a ng-click="search_p.state=11">处理中</a>
                    </li>
                    <li>
                        <a ng-click="search_p.state=21">已解决</a>
                    </li>
                    <li>
                        <a ng-click="search_p.state=31">已挂起</a>
                    </li>
                </ul>
                <div class="cont_fr_btn">
                    <div class="fr">
                        <button class="cont_f_btn3" ng-click="Channal()"><i class="add icon"></i>添加</button>
                    </div>
                </div>
            </div>
            <div class="menus">
                <div class="menus_con">
                    <div class="ui form">
                        <div class="menus">
                            <div class="menus_con">
                                <div class="ui form">
                                    <div class="four fields">
                                        <div class="inline field">
                                            <label>综合查询</label>
                                            <input type="text" ng-model="search_p.customer" style="width:160px;" placeholder="姓名/电话/编号" ng-keyup="$event.keyCode == 13 && customerDataList()">
                                        </div>
                                        <div class="inline field">
                                            <label>内容检索</label>
                                            <input type="text" ng-model="search_p.content" style="width:160px;" placeholder="内容检索" ng-keyup="$event.keyCode == 13 && customerDataList()">
                                        </div>
                                    </div>
                                    <div class="fields" style="margin-left: 4.7em;">
                                        <div class="four wide field">
                                            <button class="search_btn" ng-click="customerDataList()">查询</button>
                                            <button class="clear_btn" ng-click="exportRecords()">导出</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="menus_table">
        <!--表格-->
        <table class="ui yellow celled striped table">
            <thead>
                <tr>
                    <!--<th>投诉时间</th>
                    <th>投诉标题</th>
                    <th>状态</th>
                    <th>最后更新时间</th>
                    <th>操作</th>-->
                    <th>来电时间</th>
                    <th>来电客户</th>
                    <th>来电类型</th>
                    <th>状态</th>
                    <th>来电问题</th>
                    <th style="text-align: center">操作</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="vcust in custorme">
                    <td>{{vcust.create_time|limitTo:10}}</td>
                     <!--20170714 wjw添加客户浮窗开始-->
                    <td ><!-- {{vcust.customer_name}} -->
                        <div style="float:left;" ng-if="vcust.isCustomer == 1" float_layer customer-id='vcust.customer_id' show-name="vcust.customer_name"></div>
                        <span ng-if="vcust.isCustomer == 2">  {{vcust.customer_name}}  </span>
                    </td>
                    <!--添加浮窗结束-->
                    <td incoming-type type="{{::vcust.incoming_type}}"> </td>
                    <td complain-status status="{{::vcust.status}}"> </td>
                    <td>{{vcust.content}}</td>
                    <td style="text-align: center">
                        <a href="javascript:;" title="处理信息" ng-click="editComplainBox(vcust['complain_id'])">
                            编辑
                        </a>
                        <!--<a href="javascript:;" title="删除信息图标" ng-show="m_is_admin" ng-click="delComplain(vcust['complain_id'])">删除
                        </a>-->
                        <a href="javascript:;" title="" ng-if="showorhidden == 1 && vcust.is_hide == 11" ng-click="showComplainRecord(vcust['complain_id'])">显示
                        </a>
                        <a href="javascript:;" title="" ng-if="showorhidden == 1 && vcust.is_hide == 1" ng-click="hideComplainRecord(vcust['complain_id'])">隐藏
                        </a>
                    </td>
                </tr>
                <tr ng-show="customerpage.pageAll < 1">
                    <td colspan="5" style="color:red;">
                        <p style="text-align:center;">还没有找到数据~~~</p>
                    </td>
                </tr>
            </tbody>
        </table>
        <div class="ui pagination menu fr" ng-show='customerpage.pageAll > 1' class="ui borderless pagination menu" jspagination page-object="customerpage" page-func="customerDataList">
        </div>
    </div>
</div>
<!-- 表单开始 -->
<div class="ui edit modal">
    <i class="close icon"></i>
    <div class="header_h4">
        客户投诉内容处理
    </div>
    <div class="content">
        <form class="ui form" name="editCustomer" id="editCustomer">
            <!--<div class="one fields">
                <div class="inline field">
                    <label for="">投诉标题</label>
                    <input type="text" placeholder="投诉标题" name="Ctitle1" id="Ctitle1" ng-disabled = 'true' style="width: 474px">
                </div>
            </div>-->
            <div class="two fields">
                <div class="inline field">
                    <label for="">客户姓名</label>
                    <input type="text" name="Cname1" id="Cname1" ng-disabled='true'>
                </div>
                <div class="inline field">
                    <label for="">联系方式</label>
                    <input type="text" name="Ccontact_edit" id="Ccontact_edit" maxlength="11" ng-disabled="true">
                </div>
            </div>
            <div class="two fields">
                <div class="inline field">
                    <label for="">处理状态</label>
                    <input type="text" name="Cstate" id="Cstate" ng-disabled="true">
                </div>
                <div class="inline field">
                    <label for="">来电类型</label>
                    <select ng-model="calltypeedit" id="calltypeedit" ng-options="cltpedit.k as cltpedit.v for cltpedit in callingtype" name="calltypeedit" style=" border-radius:3px;width: 160px; padding-left: 0.5em;;" ng-checked="cltpedit.k == calltypeedit" ng-disabled="true">
                    <option value="" selected disabled hidden>来电类型</option>
                    </select>
                </div>
            </div>
            <div class="field">
                <label for="">来电问题</label>
                <textarea id="content1" name="content1" rows="3" ng-model="content1" ng-disabled="true"></textarea><br/>
            </div>
            <div style="max-height: 220px; overflow:auto">
                <div class="ui segment" ng-repeat=" con in contentres" ng-if="contentres" style="opacity:.45; border-color:rgba(34,36,38,.15);">
                    <div name="rep_content1">
                        <div class="two fields">
                            <div class="inline field"><b>处理人员:</b><b>{{con.nickname}}</b></div>
                            <div class="inline field"><b>创建时间:</b><b>{{con.create_time}}</b></div>
                        </div>
                        <div class="field">处理结果:<br><b>{{con.content}}</b></div>
                    </div>
                </div>
            </div>

            <div class="fields">
                <div class="inline field">
                    <label>本次处理情况：</label>
                    <div class="ui selection dropdown" style="width:285px;" id="stateShow">
                        <input type="hidden" name="state" id="state">
                        <i class="dropdown icon"></i>
                        <div class="default text">请选择处理情况</div>
                        <div class="menu">
                            <div class="item" data-value="{{sel.k}}"  ng-repeat="sel in statetypes">{{sel.v}}</div>
                        </div>
                    </div>
                </div>
                <div class="inline field" ng-show='rd' style="line-height: 38px; margin-left: 50px;">
                    <div class="ui radio checkbox">
                        <input type="radio" name="radio" id="radio" ng-click="cancle()">
                        <label>推送到客户端</label>
                    </div>
                </div>
            </div>
            <!--<br/>-->
            <div class="field">
                <textarea id="rep_content" name="rep_content" style="width:100%;height:50px;" ng-model="repcontent"></textarea>
            </div>
        </form>
    </div>
    <div class="actions">
        <div class="ui green button positive">确定</div>
        <button class="ui grey button negative">取消</button>
    </div>
</div>
<!-- delete form is beginnig -->
<!--<div class="ui modal modal3" id="del-model">
    <div class="header" style="text-align: center;">删除投诉记录</div>
    <div class="content" style="text-align: center;">
        <i class="huge red warning circle icon"></i>
        <p style="padding-top: 15px;">确认删除该投诉及相关处理人员的信息吗?</p>
    </div>
    <div class="actions" style="text-align: center;">
        <div class="ui positive button">确定</div>
        <button class="ui grey button negative">取消</button>
    </div>
</div>-->
<!-- delete form is the end -->
<!--<div class="ui small hint modal" id="hint-model">
    <div class="header"></div>
    <div class="content">
        <p></p>
    </div>
    <div class="actions">
        <div class="ui positive button">
            {{'BTN_OK' | translate}}
        </div>
    </div>
</div>-->
<!--delete complain records-->
<div class="ui modal modal3" id="conflict_del">
    <div class="header_h4" style="text-align: center;">删除投诉记录</div>
    <div class="content" style="text-align: center;">
        <i class="huge blue help circle icon"></i>
        <p style="padding-top: 15px;">确认删除该投诉及相关处理人员的信息吗?</p>
    </div>
    <div class="actions" style="text-align: center;">
        <div class="ui positive button">确定</div>
        <button class="ui grey button negative">取消</button>
    </div>
</div>
<!--add complain records-->
<div class="ui add modal">
    <i class="close icon"></i>
    <div class="header_h4">
        添加客户投诉记录
    </div>
    <div class="content">
        <form class="ui form" name="ChannalID" id="ChannalID">
            <!--<div class="one fields">
                <div class="inline field">
                    <label for="">投诉标题</label>
                    <input type="text" placeholder="投诉标题" name="Ctitle" id="Ctitle"  style="width: 620px">
                </div>
            </div>-->
            <div class="fields">
                <div class="five wide field required">
                    <label for="" class="label_fl">客户姓名</label>
                    <input type="text" name="Cname" id="Cname" style="width: 166px;" placeholder="客户姓名">
                </div>
                <div class="three wide field"></div>
                <div class="five wide field required">
                    <label for="" class="label_fl">联系方式</label>
                    <input type="text" name="Ccontact" id="Ccontact" maxlength="11" style="width: 166px;" placeholder="联系方式">
                </div>
            </div>
            <div class="three fields">
                <div class="field required">
                    <label class="label_fl">来电类型</label>
                    <select ng-model="calltype" id="calltype" ng-options="cltp.k as cltp.v for cltp in callingtype" name="calltype" class="ui dropdown">
                <option value="" selected disabled hidden>来电类型</option>
                </select>
                </div>
            </div>
            <div class="field required">
                <label>来电问题</label>
                <textarea id="info" name="info" style="width:100%;" placeholder="投诉内容"></textarea>
            </div>
        </form>
    </div>
    <div class="actions">
        <div class="ui green button positive">确定</div>
        <button class="ui grey button negative">取消</button>
    </div>
</div>
<!--添加成功-->
<div class="ui modal modal1" style="text-align: center;">
    <div class="header center aligned">提示</div>
    <div class="content center aligned">
        <i class="huge green check circle outline icon"></i>
        <p style="padding-top: 15px;">添加成功</p>
    </div>
</div>
<!--添加失败-->
<div class="ui modal modal2" style="text-align: center;">
    <div class="header center aligned">提示</div>
    <div class="content center aligned">
        <i class="huge red remove circle outline icon"></i>
        <p style="padding-top: 15px;">添加失败</p>
    </div>
</div>
<!--编辑成功-->
<div class="ui modal modal4" style="text-align: center;">
    <div class="header center aligned">提示</div>
    <div class="content center aligned">
        <i class="huge green check circle outline icon"></i>
        <p style="padding-top: 15px;">更新成功</p>
    </div>
</div>
<!--编辑失败-->
<div class="ui modal modal5" style="text-align: center;">
    <div class="header center aligned">提示</div>
    <div class="content center aligned">
        <i class="huge red remove circle outline icon"></i>
        <p style="padding-top: 15px;">更新失败</p>
    </div>
</div>

<div class="ui modal noEdit" style="text-align: center;">
    <div class="header">提示</div>
    <div class="content">
        <i class="huge red warning outline icon"></i>
        <p style="padding-top: 15px;">客户投诉信息反馈请前往风险管理模块处理</p>
    </div>
</div>

<script type="text/javascript">
    $(function() {
        $('.ui.dropdown').dropdown();
        $("#nav li").click(function() {
            $(this).addClass('selected').siblings().removeClass('selected');
        });
        $('#ChannalID').form({
            on: 'blur',
            inline: true,
            fields: {
                Cname: {
                    identifier: 'Cname',
                    rules: [{
                        type: 'empty',
                        prompt: '投诉人姓名不能为空'
                    }]
                },
                info: {
                    identifier: 'info',
                    rules: [{
                        type: 'empty',
                        prompt: '投诉内容不能为空'
                    }, {
                        type: 'maxLength[1000]',
                        prompt: '投诉内容的字数不能超出1000个'
                    }]
                },
                // Ctitle: {
                //     identifier: 'Ctitle',
                //     rules: [{
                //         type: 'empty',
                //         prompt: '投诉标题不能为空'
                //     }, {
                //         type: 'maxLength[40]',
                //         prompt: '投诉内容的字数不能超出40个'
                //     }]
                // },
                Ccontact: {
                    identifier: 'Ccontact',
                    rules: [{
                        type: 'length[11]',
                        prompt: '请填写正确的电话号码'
                    }]
                },
                calltype: {
                    identifier: 'calltype',
                    rules: [{
                        type: 'empty',
                        prompt: '来电类型不能为空'
                    }]
                }

            }
        });

        $('#editCustomer').form({
            on: 'blur',
            inline: true,
            fields: {
                content1: {
                    identifier: 'content1',
                    rules: [{
                        type: 'empty',
                        prompt: '回复信息不能为空'
                    }, {
                        type: 'maxLength[1000]',
                        prompt: '回复内容的字数不能超出1000个'
                    }]
                },
                rep_content: {
                    identifier: 'rep_content',
                    rules: [{
                        type: 'empty',
                        prompt: '处理内容不能为空'
                    }, {
                        type: 'maxLength[1000]',
                        prompt: '处理内容的字数不能超出1000个'
                    }]
                }

            }
        });
    });
</script>
<!-- 表单结束 -->